const mongoose = require("mongoose");

//just set new schema and change "mongodb.ts" can expand 
class MongoSchema {
    private Schema: any;
    constructor() {
        this.Schema = mongoose.Schema;
    };
    user() {
        return new this.Schema({
            _id:String,
            name: { type: String, required: true },
            dob:{ type: Date, default: Date.now},
            description:{type:String,default:"The user has no description"},
            createdAt:{type: Date, default: Date.now}
        })
    };
};

export  default new MongoSchema
